package com.info.zhiduoduo.repository.entity.system;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("zdd_system_phonecode")
public class PhoneCode extends Model<PhoneCode> {

    @TableId(value = "phone",type = IdType.INPUT)
    private String phone;//` varchar(20) NOT NULL,
    private String verifycode;//` char(4) DEFAULT '',
    private String ipaddr;//` varchar(30) DEFAULT '' COMMENT 'IP地址',
    /**
     * 状态 1.正常 2.已使用 3.已过期
     */
    private Integer state;
    private Timestamp createtime;//` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    private Date updatetime;

    @Override
    protected Serializable pkVal() {
        return phone;
    }
}
